import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.util.Scanner;
public class NameWork {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入姓名：");
        String s1 = in.next();
        System.out.println("请输入格式：");
        String s2 = in.next();
        if (isChinese(s1) && s2.equals(".rar") || isChinese(s1) && s2.equals(".zip")) {
            System.out.println("提交成功！");
        } else {
            System.out.println("提交失败，请检查作业命名是否规范");
        }
    }

    public static boolean isChinese(char c) {
        return c >= 0x4E00 && c <= 0x9FA5;
    }

    public static boolean isChinese(String s) {
        if (s == null) {
            return false;
        }
        char[] ch = s.toCharArray();
        for (char c : ch) {
            if (isChinese(c)) {
                return true;
            }
        }
        return false;
    }

}
